package com.perceptivesoftware.licensing.server.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;
import com.perceptivesoftware.licensing.client.common.util.Utils;
import com.perceptivesoftware.licensing.client.dto.UserDTO;
import com.perceptivesoftware.licensing.domain.generated.TwUserval;

@Component
public class UserUtil {

	private final Log logger = LogFactory.getLog(getClass());

	/**
	 * Creates a dto to represent the hibernate entity.
	 * 
	 * @param nl
	 * @return
	 */
	public UserDTO getUserInfo(TwUserval user) {
		final UserDTO userDTO = new UserDTO(user.getUservalId(), user.getUservalUserName(), Utils.isY(user.getUservalSuper()));
//		userDTO.setEmail(user.getUservalEmail());
		return userDTO;
	}
}
